package com.ruoyi.reserve.service.impl;

import com.ruoyi.reserve.domain.Order;
import com.ruoyi.reserve.mapper.OrderMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceImpl implements IOrderService{
    @Autowired
    private OrderMapper orderMapper;




    /**
     * 查询预约列表
     * @param order
     * @return
     */
    @Override
    public List<Order> selectOrderList(Order order) {
        return orderMapper.selectOrderList(order);
    }



    /**
     * 修改预约状态为确认预约
     * @param order
     * @return
     */
    @Override
    public int updateConfirmOrderStatus(Order order) {
        return orderMapper.updateConfirmOrderStatus(order);
    }

    /**
     * 修改预约状态为取消预约
     * @param order
     * @return
     */
    @Override
    public int updateCancelOrderStatus(Order order) {
        return orderMapper.updateCancelOrderStatus(order);
    }

    /**
     * 新增中的查询
     * @param order
     * @return
     */
    @Override
    public List<Order> selectOrderInsertList(Order order) {
        return orderMapper.selectOrderInsertList(order);
    }

    /**
     * 新增预约
     * @param order
     * @return
     */
    @Override
    public int insertOrder(Order order) {
        return orderMapper.insertOrder(order);
    }
}
